#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
int main()
{
	FILE* a = fopen("data.txt", "r");
	if (a == NULL)
	{
		perror("fopen");
		return 1;
	}
	char b[50] = { 0 };
	char* s=fgets(b, 10, a);
	FILE* c = fopen("data_copy.txt", "w");
	if (c == NULL)
	{
		perror("fopen");
		return 1;
	}
	fputs(s, c);
	fclose(a);
	a = NULL;
	fclose(c);
	c = NULL;
	return 0;
}